package com.ruoyi;

import com.ruoyi.project.enable.EnableAutoEnhance;
import com.ruoyi.project.socket.server.Server;
import io.netty.channel.ChannelFuture;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * 启动程序
 * 
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
//@EnableAutoEnhance
public class RuoYiApplication implements CommandLineRunner
{
    public static void main(String[] args)
    {
        System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(RuoYiApplication.class, args);
    }

    @Value("${netty.port}")
    private int port;

    @Autowired
    private Server server;

    @Override
    public void run(String... args) throws Exception {
        server.run(args,port);
    }
}
